package com.jlboot.model.po.sys;

import com.jlboot.core.base.Models;
import com.jfinal.plugin.activerecord.Model;
import com.jlboot.core.consts.Consts;
import com.jlboot.core.util.LoginUtil;

import java.util.Date;

/**
 * Created by 51594 on 2022/9/10.
 */
public class SysDept extends Model<SysDept> {
    public static final SysDept dao = new SysDept().dao();
    public static final String table="sys_dept";
    public Models mod = Models.n(this);

    public static String getNextId(){
        return SysIdGenerator.dao.getNextId(table);
    }

    public SysDept setCommon(){
        Date now=new Date();
        this.set("id",SysIdGenerator.dao.getNextId(table));
        this.set("del_tag", Consts.COMMON_NONE_DEL);
        this.set("create_time",now);
        this.set("update_time",now);
        this.set("create_by", LoginUtil.getUserId());
        this.set("update_by",LoginUtil.getUserId());
        return this;
    }

}
